﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SendMail.aspx.cs" Inherits="SendMailDemo.SendMail" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <h2>发送电子邮件</h2>

        <div>
            <label for="txtSmtpServer">SMTP服务器名</label>
            <asp:TextBox ID="txtSmtpServer" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="txtSmtpServer"></asp:RequiredFieldValidator>
        </div>
        <div>
            <label for="txtSenderEmailAddress">发送人电子邮箱账号</label>
            <asp:TextBox ID="txtSenderEmailAddress" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="txtSenderEmailAddress"></asp:RequiredFieldValidator>
        </div>
        <div>
            <label for="txtSenderEmailPassword">发送人电子邮箱密码</label>
            <asp:TextBox ID="txtSenderEmailPassword" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*" ControlToValidate="txtSenderEmailPassword"></asp:RequiredFieldValidator>
        </div>
        <div>
            <label for="txtRecipients">接收人，多个接收人用英文逗号分隔</label>
            <asp:TextBox ID="txtRecipients" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*" ControlToValidate="txtRecipients"></asp:RequiredFieldValidator>
        </div>
        <div>
            <label for="txtSubject">邮件主题</label>
            <asp:TextBox ID="txtSubject" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*" ControlToValidate="txtSubject"></asp:RequiredFieldValidator>
        </div>
        <div>
            <label for="txtBody">邮件正文</label>
            
            <asp:TextBox ID="txtBody" runat="server" TextMode="MultiLine"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="*" ControlToValidate="txtBody"></asp:RequiredFieldValidator>
        </div>
        <div>
            <asp:Button ID="btnSubmit" runat="server" Text="发送电子邮件" />
        </div>
    </form>
</body>
</html>
